#include<stdio.h>
void rev(int n)
{
	int tmp = n%10;
	if(tmp != 0)
		printf("%d", tmp);
	n /= 10;
	while(n != 0)
	{
		int tmp = n%10;
		printf("%d", tmp);
		n /= 10;
	}
	printf("\n");
}
int main()
{
	int n;
	while(scanf("%d", &n) != EOF)
	{
		rev(n);
	}
	return 0;
}
